from django.db import models

class UserType(models.Model):
	caption = models.CharField(max_length=32)

class UserGroup(models.Model):
	name = models.CharField(max_length=32)

class UserInfo(models.Model):
	# username = models.CharField(verbose_name='用户名', max_length=32)
	username = models.CharField(max_length=32)
	email = models.EmailField()
	user_type = models.ForeignKey(to='UserType', on_delete=None, to_field='id')
	u2g = models.ManyToManyField(UserGroup)